package com.yumeko.zkclient;

import org.I0Itec.zkclient.ZkClient;

/**
 * @program: zookeeper
 * @description:
 * @author: Zheng Hao
 * @create: 2020-03-26 14:02
 */
public class CreateNode {
    public static void main(String[] args) {
        ZkClient zkClient = new ZkClient("192.168.106.128:2183", 3000, 5000);
        //createParents的值设置为true，可以递归创建节点
        zkClient.createPersistent("/RecursiveCreate/yumeko",true);
        //监听数
        System.out.println(zkClient.numberOfListeners());
    }
}
